<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body class="timo-layout-page">
<div class="layui-card">
    <div class="layui-card-body">
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="timo-table-checkbox">
                        <label class="timo-checkbox"><input type="checkbox">
                            <i class="layui-icon layui-icon-ok"></i></label>
                    </th>
                    <th>项目名称</th>
                    <th>代码仓库类型</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}" th:checked="${#lists.contains(selectedList, item.id)}">
                        <i class="layui-icon layui-icon-ok"></i></label></td>
                    <td th:text="${item.display_name+' - '+T(org.apache.commons.io.FilenameUtils).getBaseName(item.repo_url)}">项目名称</td>
                    <td>
                        <select class="timo-search-select" disabled="disabled" mo:dict="APP_REPO_TYPE" mo-selected="${item.repo_type}"></select>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div th:replace="/common/fragment :: page"></div>
        <div class="layui-form-item timo-finally">
            <a class="layui-btn ajax-status" data-null="1" th:href="@{/app/versionApp/save(versionId=${versionId})}" data-title="所选项目(删除的项目，开发分支也会被删除)"><i class="fa fa-check-circle"></i> 保存</a>
            <a class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</a>
        </div>
    </div>
</div>
<script th:replace="/common/template :: script"></script>
<script>
    $(document).ready(function () {
        console.log("请求/app/versionApp/task/status获取当前版本有没有异步任务，如果有，就提示...")
    });
</script>
</body>
</html>